<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // let ret = 1;
        
        // let number = {
        //     name : '帅哥',
        //     age : 27,
        //     active : function() {
        //         console.log("我是神里绫人的狗!!!");
        //     }
        // }
        // console.log(number.name);
        // number.active();

        function fun(name,age,gender,singMsg) {
            this.name = name;
            this.age = age;
            this.gender = gender;
            this.active = function() {
                console.log(singMsg);
            };
            
        }
        let number1 = new fun('钟离',100,'male','钟离爸爸爱我!!');
        let number2 = new fun('钟离',100,'male','钟离爸爸爱我!!');

        //写到这里,仍然不清楚是返回什么类型
        //返回的类型取决于x+y的类型,取决于x和y的类型
        // let add = function() {
        //     let count = 0;
        //     for(let i = 0;i<arguments.length;i++) {
        //         count+=arguments[i];
        //     }
        //     return count;
        // }
        
        // let a = 0;
        // a = add(1,2);
        // console.log(a);
        // a = add(1,2,3);
        // console.log(a);
        // a = add(1,2,3,4);
        // console.log(a);
        // a = add(1,2,3,4,5);
        // console.log(a);
        // a = add(1,2,3,4,5,6);
        // console.log(a);
        // a = add(1,2,3,4,5,6,7);
        // console.log(a);
        // a = add(1,2,3,4,5,6,7,8);
        // console.log(a);

        
        
    </script>
</body>
</html>